package org.stream.answerduel.entity;

import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 功能描述：对战历史实体类
 *
 * @Auther: 苏建誉
 * @Date: 2019/7/12 11:48
 */
@Entity
@Accessors(chain = true)
@Data
@Table(name = "t_history")
public class AnswerDetails extends BaseEntity{

    /**
     * 玩家id
     */
    @Column(name = "user_id")
    private Long userId;
    /**
     * 对手玩家id
     */
    @Column(name = "rival_id")
    private Long rivalId;
    /**
     * 玩家选择
     */
    @Column(name = "choice")
    private int choice;
    /**
     * 正确答案
     */
    @Column(name = "answer")
    private int answer;
    /**
     * 题目id
     */
    @Column(name = "subject_id")
    private String subjectId;
    /**
     * 玩家作答时间
     */
    @Column(name = "time")
    private long time;
    /**
     * 玩家得分
     */
    @Column(name = "score")
    private int score;

    /**
     * 房间号
     */
    @Column(name = "room_id")
    private Long roomId;
}
